﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Download 2 Zip</title>

    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script>
        var hostweburl;
        // Load the SharePoint resources.
        $(document).ready(function () {

            // Get the URI decoded app web URL.

            hostweburl =
                decodeURIComponent(
                    getQueryStringParameter("SPHostUrl")
            );


            // The SharePoint js files URL are in the form:
            // web_url/_layouts/15/resource.js
            var scriptbase = hostweburl + "/_layouts/15/";

            // Load the js file and continue to the
            // success handler.
            $.getScript(scriptbase + "SP.UI.Controls.js", renderChrome)
        });

        //Function to prepare the options and render the control
        function renderChrome() {
            // The Help, Account and Contact pages receive the
            //   same query string parameters as the main page
            var options ={
                    "appHelpPageUrl": "http://www.arthurgraus.nl",
                    "appIconUrl": "/Images/AppIconDownload2Zip.png",
                    "appTitle": "Download 2 Zip",
                    "settingsLinks": [
                        {
                            "linkUrl": "http://www.arthurgraus.nl",
                            "displayName": "Arthur Graus"
                        }
                    ]
                };

            var nav = new SP.UI.Controls.Navigation("chrome_ctrl_container", options);
            nav.setVisible(true);
       
        }

        // Function to retrieve a query string value.
        // For production purposes you may want to use
        // a library to handle the query string.
        function getQueryStringParameter(paramToRetrieve) {
            try {
                var params =
                    document.URL.split("?")[1].split("&");
                var strParams = "";
                for (var i = 0; i < params.length; i = i + 1) {
                    var singleParam = params[i].split("=");
                    if (singleParam[0] == paramToRetrieve)
                        return singleParam[1];
                }
            }
            catch (err)
            { return ""; }
        }
    </script>

</head>
<body>
    <div id="chrome_ctrl_container"></div>

    @RenderBody()


</body>
</html>
